package com.young.web.ec.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.young.web.ec.core.service.MenuEventHandler;
import com.young.web.ec.core.service.MenuService;
import com.young.web.ec.core.service.OrderEventHandler;
import com.young.web.ec.core.service.OrderService;
import com.young.web.ec.persistence.services.MenuPersistenceService;
import com.young.web.ec.persistence.services.OrderPersistenceService;

@Configuration
public class CoreConfig {
	
	@Bean
	public MenuService menuService(MenuPersistenceService menuPersistenceService) {
		return new MenuEventHandler(menuPersistenceService);
	}
	 @Bean
	  public OrderService orderService(OrderPersistenceService orderPersistenceService) {
	    return new OrderEventHandler(orderPersistenceService);
	  }

}
